library database;

include <core.vhs>

import core::*;
	
namespace CSV {
	function openDatabase(dbname, dbconfig=null) {
		var f = new CsvFile(dbname);
		if (dbconfig != null)
			f.writeln(dbconfig);
		return f;
	}
	
	function closeDatabase(handle) {
		handle?.close();
	}
	
	function insert(handle,...) 
		handle?.writeCsvLine(__args);
}